﻿using QMERP.Domain.Dtos;
using QMERP.Domain.PrintModels;

namespace QMERP.Application.Services
{
    public interface IRetailOrderService
    {
        /// <summary>
        /// 散镜订单窗体
        /// </summary>
        /// <returns></returns>
        Task<PageResponse<RetailOrderResponse>> Query(PageRequest<RetailOrderRequest> request);

        /// <summary>
        /// 获取id的散镜订单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<RetailOrderResponse> Detail(long id);

        /// <summary>
        /// 散镜订单保存
        /// </summary>
        /// <param name="request"></param>
        /// <param name="isCheck"></param>
        /// <returns></returns>
        Task<RetailOrderResponse> Save(RetailOrderSaveRequest request, bool isCheck = false);

        /// <summary>
        /// 散镜订单审核
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Check(long[] ids);

        /// <summary>
        /// 散镜订单弃审
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task UnCheck(long[] ids);

        /// <summary>
        /// 散镜订单取消
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Cancel(long[] ids);

        /// <summary>
        /// 散镜订单完成
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Finish(long[] ids);

        /// <summary>
        /// 获取散镜订单主要信息列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<RetailOrderMainInfoResponse>> GetRetailOrderMainInfos(PageRequest<RetailOrderRequest> request);

        /// <summary>
        /// 获取发票数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<RetailOrderInvoice>> GetInvoices(long[] ids);

        /// <summary>
        /// 批量出库
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
       Task<List<LeaveStockOrderResponse>> BatchLeaveStock(long[] ids);

        /// <summary>
        /// 导入
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task Import(RetailOrderImportRequest request);
    }
}
